package net.citrite.android.render;

import com.android.ide.common.rendering.LayoutLibrary;
import com.android.ide.common.rendering.api.ViewInfo;


public class RenderFactory {
    public static Control createRenderControl(ViewInfo info, LayoutLibrary layoutLibrary) {
        String className = info.getClassName();
        try {
            if (className.equals("android.widget.TextView")) {
                return new TextView(info, layoutLibrary);
            } else if (className.equals("android.widget.Button")) {
                return new Button(info, layoutLibrary);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
